<html>
  <head>
    <script src="https://cdn.socket.io/4.3.2/socket.io.min.js" integrity="sha384-KAZ4DtjNhLChOB/hxXuKqhMLYvx3b5MlT55xPEiNmREKRzeEm+RVPlTnAn0ajQNs" crossorigin="anonymous"></script>
    <script>
      const socket = io('http://localhost:3000');
      socket.on('connect', function() {
        console.log('Connected');

        socket.emit('findAllAaa', response =>
            console.log('findAllAaa', response),
        );

        socket.emit('findOneAaa', 1, response =>
            console.log('findOneAaa', response),
        );

        socket.emit('createAaa', {name: 'guang'},response =>
            console.log('createAaa', response),
        );

        socket.emit('updateAaa',{id: 2, name: 'dong'},response =>
            console.log('updateAaa', response),
        );

        socket.emit('removeAaa', 2,response =>
            console.log('removeAaa', response),
        );

        socket.on('guang', function(data) {
            console.log('guang', data);
        });
      });
      socket.on('disconnect', function() {
        console.log('Disconnected');
      });
    </script>
  </head>

  <body></body>
</html>
